package com.gotop.entity.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.gotop.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @program: cem
 * @description:
 * @author: superfish
 * @create: 2020-12-29 16:22
 **/
@Data
@TableName("system_client")
@ApiModel(value = "Client对象", description = "Client对象")
public class Client extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "客户端id")
    private String clientId;

    @ApiModelProperty(value = "客户端密码")
    private String clientSecret;

    @ApiModelProperty(value = "租户id")
    private String tenantId;

    @ApiModelProperty(value = "应用名称")
    private String name;

    @ApiModelProperty(value = "资源集合")
    private String resourceIds;

    @ApiModelProperty(value = "授权范围")
    private String scope;

    @ApiModelProperty(value = "授权类型")
    private String authorizedGrantTypes;

    @ApiModelProperty(value = "回调地址")
    private String webServerRedirectUri;

    @ApiModelProperty(value = "权限")
    private String authorities;

    @ApiModelProperty(value = "令牌过期秒数")
    private Integer accessTokenValidity;

    @ApiModelProperty(value = "令牌过期秒数")
    private Integer refreshTokenValidity;

    @ApiModelProperty(value = "附加说明")
    private String additionalInformation;

    @ApiModelProperty(value = "自动授权")
    private String autoapprove;

    @ApiModelProperty(value = "类型：0.登录授权 1.sdk授权")
    private Integer type;

    @ApiModelProperty(value = "ip白名单")
    private String ipWhiteList;
}
